/**
 * @brief    六节点三角形壳单元 CTRIA6 数据结构
 * 
 * @author   Liu Xing
 * @date     2025.10.20
 */

#pragma once
#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Element/ElementBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC CTRIA6Data : public ElementBase
{
    SG::DataStructure::Common::Id   m_pId      = 0;                   ///< property's id
    SG::DataStructure::Common::Id   m_g[6]     = { 0 };                 ///< nodes' id
    SG::DataStructure::Common::Real m_theta    = 0.0;                   /// 材料属性方向角度
    SG::DataStructure::Common::Real m_zoffs    = 0.0;                   /// 从网格点的表面偏移到元素参考平面
    SG::DataStructure::Common::I64  m_tflag    = 0.0;                   /// 表示Ti值的含义
    SG::DataStructure::Common::Real m_ti[3]    = { -1.0, -1.0, -1.0 };  /// 单元膜厚度
    SG::DataStructure::Common::Id   m_mcId     = -1.0;                  /// 材料坐标系号
    SG::DataStructure::Common::Id   m_domainId = 0;                     ///< nodes' id

    static ElementTypes GetType ()
    {
        return ElementTypes::ELETYPE_ShellTria6;
    };  
};

/// @brief 判断两个CTRIA6Data是否相等
DECLSPEC bool operator== (const CTRIA6Data& a, const CTRIA6Data& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE